package cn.icanci.loopstack.pcc.test.metagroup;

import cn.icanci.loopstack.pcc.model.MetaCell;
import cn.icanci.loopstack.pcc.model.ListMetaCellGroup;
import cn.icanci.loopstack.pcc.test.order.Order;

import java.util.List;

import com.google.common.collect.Lists;

/**
 * @author icanci(1205068)
 * @version Id: OrderListMetaCellGroup, v 0.1 2024/8/2 15:29 icanci Exp $
 */
public class OrderListMetaCellGroup extends ListMetaCellGroup<Order> {

    /**
     * 返回元组聚合数据
     *
     * @return 返回元组聚合数据
     */
    @Override
    public List<Order> adapterCells() {
        List<Order> orders = Lists.newArrayList();

        List<MetaCell<?, ?, Order>> metaCells = getMetaCells();
        for (MetaCell<?, ?, Order> metaCell : metaCells) {
            orders.add(metaCell.getTarget());
        }

        return orders;
    }
}